package cn.yshujia.transform;

import cn.yshujia.domain.entity.Website;
import cn.yshujia.domain.vo.WebsiteVO;

/**
 * @author YShuJia
 * @create 2025/1/10
 * @description WebsiteTransform
 */

public class WebsiteTransform {
	public static WebsiteVO entity2VO(Website website) {
		if (website == null) {
			return null;
		}
		WebsiteVO websiteVO = new WebsiteVO();
		websiteVO.setId(website.getId());
		websiteVO.setUserId(website.getUserId());
		websiteVO.setLabelId(website.getLabelId());
		websiteVO.setTitle(website.getTitle());
		websiteVO.setAvatar(website.getAvatar());
		websiteVO.setIntroduction(website.getIntroduction());
		websiteVO.setUrl(website.getUrl());
		websiteVO.setCover(website.getCover());
		websiteVO.setCreateTime(website.getCreateTime());
		websiteVO.setIsRecommend(website.getIsRecommend());
		websiteVO.setStatus(website.getStatus());
		return websiteVO;
	}
}
